package exam;

import java.util.Scanner;

public class EX01_SungJukService implements EX01_ISungJukService {

	private EX01_SungJukDAO sdao = new EX01_SungJukDAO();
	
	@Override
	public void createSungJuk() {

		System.out.println( "1. 회원가입" );
		
		Scanner sc = new Scanner(System.in);
		EX01_SungJukVO s = new EX01_SungJukVO();
		
		System.out.println( "국어 !" );
		s.setKor( sc.nextFloat() ); 
		System.out.println( "영어 !" );
		s.setEng( sc.nextFloat() );
		System.out.println( "수학 " );
		s.setMat( sc.nextFloat() );
		s.setTot( s.getKor() + s.getEng() + s.getMat() );
		s.setAvg( s.getTot() / 3 );
		

		
		
		// 입력받은 데이터들을 membr 테이블에 저장
		if ( sdao.insertSungJuk(s) ){
			System.out.println( "입력 성공" );
		}
		else{
			System.out.println( "입력 실패" );
		}
		
	}

	
	
} //  EX01_SungJukService
